bitkeeper revision 1.1098.1.5 (4107d93fB9w7rxImNiunJcTl4YxzoA)
authorsos22@donkeykong.cl.cam.ac.uk <sos22@donkeykong.cl.cam.ac.uk>
Wed, 28 Jul 2004 16:50:07 +0000 (16:50 +0000)
committersos22@donkeykong.cl.cam.ac.uk <sos22@donkeykong.cl.cam.ac.uk>
Wed, 28 Jul 2004 16:50:07 +0000 (16:50 +0000)
Avoid being a monkey.

xen/arch/x86/xdb.c

index 8074e12fd75f7f531d315fecb35f9b26dcb4d45e..8c3b49c4d9e3ffb1a57ea462a2176e8f9ecf06c1 100644 (file)
@@ -110,8 +110,6 @@ receive_command(char *recv_buf)
 static void
 u32_to_hex_u8(unsigned char val, char *buf)
 {
-       if (val >= 256)
-               BUG();
        sprintf(buf, "%.02x\n", val);
 }
 
@@ -124,7 +122,7 @@ u32_to_hex_u32(unsigned val, char *buf)
 static void
 xendbg_send_hex_u8(unsigned char val)
 {
-       char buf[2];
+       char buf[3];
        u32_to_hex_u8(val, buf);
        xendbg_send(buf, 2);
 }
@@ -168,7 +166,7 @@ xendbg_finish_reply(void)
 static void
 xendbg_sendrep_hex_u8(unsigned val)
 {
-       char buf[2];
+       char buf[3];
        u32_to_hex_u8(val, buf);
        xendbg_sendrep_data(buf, 2);
 }
@@ -176,7 +174,7 @@ xendbg_sendrep_hex_u8(unsigned val)
 static void
 xendbg_sendrep_hex_u32(unsigned val)
 {
-       char buf[8];
+       char buf[9];
        u32_to_hex_u32(val, buf);
        xendbg_sendrep_data(buf, 8);
 }
@@ -200,7 +198,7 @@ handle_memory_read_command(unsigned long addr, unsigned long length)
        unsigned old_s_limit;
 
        dbg_printk("Memory read starting at %lx, length %lx.\n", addr,
-              length);
+                  length);
        old_s_limit = current->addr_limit.seg;
        current->addr_limit.seg = ~0;
        xendbg_start_reply();